<?php

class SchuleVO {
	public $id;
	public $name;
	public $adr_street;
	public $adr_plz;
	public $adr_town;
	public $termin;
	public $tel;
	public $ansprechpartner;
	public $homepage;
	public $foto;
	public $position;

	public function __construct($pId = null, $pName = null, $pAdr_street = null, $pAdr_plz = null, $pAdr_town = null, $pTel = null, $pAnsprechpartner = null, $pHomepage = null, $pFoto = null, $pPosition = null) {
		$this->id = $pId;
		$this->name = $pName;
		$this->adr_street = $pAdr_street;
		$this->adr_plz = $pAdr_plz;
		$this->adr_town = $pAdr_town;
		$this->termin="";
		$this->tel = $pTel;
		$this->ansprechpartner = $pAnsprechpartner;
		$this->homepage = $pHomepage;
		$this->foto = $pFoto;
		$this->position = $pPosition;
	}

	public function __get($pMemberName) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			return $this-> $member;
		}
	}

	public function __set($pMemberName, $pValue) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			$this-> $member = $pValue;
		}
	}
	public function show() {
		$members = get_object_vars($this);
		foreach ($members as $key => $value) {
			printf("%s : %s <br>", $key, $value);
		}
	}

	public function getObjectVars() {
		return get_object_vars($this);
	}
}
?>
